-- GENERATED SPELL FOR [Bladespire Crusher] --


function spell0_20765(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20765', 653, 1)
end

function spell1_20765(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_20765', 613, 1)
end

function Sorts_20765(pUnit, Event)
local choix_sorts_20765 = math.random(0, 1)
if choix_sorts_20765 == 0 then
pUnit:RegisterEvent('spell0_20765', 1, 1)
end
if choix_sorts_20765 == 1 then
pUnit:RegisterEvent('spell1_20765', 1, 1)
end
end

function mob20765_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20765', math.random(1500, 3000), 1)
end

function mob20765_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20765_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20765_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20765, 1, 'mob20765_Action')
RegisterUnitEvent(20765, 2, 'mob20765_Leave')
RegisterUnitEvent(20765, 3, 'mob20765_Kill')
RegisterUnitEvent(20765, 4, 'mob20765_Die')
